<<<<<<< HEAD
import Vue from 'vue'
import Vuex from 'vuex'

=======

import Vue from "vue"
import Vuex from "vuex"
>>>>>>> da85937c46a68704623e1c653d56a4a2c6859127
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
<<<<<<< HEAD
    ConfirmResult:sessionStorage.getItem('ConfirmResult'),
  },
  mutations: {
=======
	islogin:sessionStorage.getItem('islogin'), 
    uname:sessionStorage.getItem('uname'),
    img:sessionStorage.getItem('img'),
    ConfirmResult:sessionStorage.getItem('ConfirmResult'),
  },
  mutations:{
>>>>>>> da85937c46a68704623e1c653d56a4a2c6859127
    setCity(state,newcity){
      state.ConfirmResult=newcity
      console.log(state.ConfirmResult);
      sessionStorage.setItem('ConfirmResult',newcity)
<<<<<<< HEAD
    }
  },
  actions: {
  },
  modules: {
=======
    },
	//登陆成功后修改state属性
    updateUname(state,payload){
      state.uname=payload  //修改用户信息
      state.islogin=true  //修改登录状态
      //将状态信息存入sessionStorage里
      sessionStorage.setItem('islogin',true)
      sessionStorage.setItem('uname',payload)
    },
    updateImg(state,payload){
      state.img=payload  //修改用户信息
      state.islogin=true  //修改登录状态
      //将状态信息存入sessionStorage里
      sessionStorage.setItem('islogin',true)
      sessionStorage.setItem('img',payload)
    },
  },
  actions: {},
  modules: {
    
>>>>>>> da85937c46a68704623e1c653d56a4a2c6859127
  }
})
